package han.bifang.common.entity;
import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * The primary key class for the SOA_USER_ROLE_REL database table.
 * 
 * @author Kent
 */
public class SoaUserRoleRelPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private String roleId;
	private String userId;

    public SoaUserRoleRelPK() {
    }

	public String getRoleId() {
		return this.roleId;
	}
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public String getUserId() {
		return this.userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof SoaUserRoleRelPK)) {
			return false;
		}
		SoaUserRoleRelPK castOther = (SoaUserRoleRelPK)other;
		return new EqualsBuilder()
			.append(this.getRoleId(), castOther.getRoleId())
			.append(this.getUserId(), castOther.getUserId())
			.isEquals();
    }
    
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getRoleId())
			.append(getUserId())
			.toHashCode();
    }

	public String toString() {
		return new ToStringBuilder(this)
			.append("roleId", getRoleId())
			.append("userId", getUserId())
			.toString();
	}
}